gint width,
gint height)
{
- GdkDrawable *composite, *composite_impl;
+ GdkDrawable *composite;
gint composite_x_offset = 0;
gint composite_y_offset = 0;
&composite_x_offset,
&composite_y_offset);
- /* The draw_drawable call below is will recurse into gdk_draw_drawable again,
- * specifying the right impl for the destination. This means the composite
- * we got here will be fed to get_composite_drawable again, which is a problem
- * for window as that causes double the composite offset. Avoid this by passing
- * in the impl directly.
- */
- if (GDK_IS_WINDOW (composite))
- composite_impl = GDK_WINDOW_OBJECT (src)->impl;
- else
- composite_impl = composite;
-
/* TODO: For non-native windows this may copy stuff from other overlapping
windows. We should clip that and (for windows with bg != None) clear that
area in the destination instead. */
if (GDK_DRAWABLE_GET_CLASS (drawable)->draw_drawable_with_src)
GDK_DRAWABLE_GET_CLASS (drawable)->draw_drawable_with_src (drawable, gc,
- composite_impl,
+ composite,
xsrc - composite_x_offset,
ysrc - composite_y_offset,
xdest, ydest,
src);
else /* backwards compat for old out-of-tree implementations of GdkDrawable (are there any?) */
GDK_DRAWABLE_GET_CLASS (drawable)->draw_drawable (drawable, gc,
- composite_impl,
+ composite,
xsrc - composite_x_offset,
ysrc - composite_y_offset,
xdest, ydest,
{
GdkPixmapObject *private = (GdkPixmapObject *)drawable;
- _gdk_gc_remove_drawable_clip (gc);
- gdk_draw_drawable (private->impl, gc, src, xsrc, ysrc,
- xdest, ydest,
- width, height);
+ _gdk_gc_remove_drawable_clip (gc);
+ /* Call the method directly to avoid getting the composite drawable again */
+ GDK_DRAWABLE_GET_CLASS (private->impl)->draw_drawable_with_src (private->impl, gc,
+ src,
+ xsrc, ysrc,
+ xdest, ydest,
+ width, height,
+ original_src);
}
static void
BEGIN_DRAW;
- gdk_draw_drawable (impl, gc, src, xsrc, ysrc,
- xdest - x_offset, ydest - y_offset, width, height);
+ /* Call the method directly to avoid getting the composite drawable again */
+ GDK_DRAWABLE_GET_CLASS (impl)->draw_drawable_with_src (impl, gc,
+ src,
+ xsrc, ysrc,
+ xdest - x_offset,
+ ydest - y_offset,
+ width, height,
+ original_src);
if (!private->paint_stack)
{